package com.xxxx.seckill.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xxxx.seckill.mapper.GoodsMapper;
import com.xxxx.seckill.pojo.Goods;
import com.xxxx.seckill.service.IGoodsService;
import com.xxxx.seckill.vo.GoodsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 商品表 服务实现类
 * </p>
 *
 * @author heyanfeng
 * @since 2022-08-01
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {

    @Resource
    private GoodsMapper goodsMapper;
   
    /**
     * @Author heyanfeng
     * @Description // 获取商品列表
     * @Date 15:45 2022/8/1
     * @Param []
     * @return java.util.List<com.xxxx.seckill.vo.GoodsVo>
     **/
    @Override
    public List<GoodsVo> findGoodsVO() {
        return goodsMapper.findGoodsVO();
    }

    /**
     * @Author heyanfeng
     * @Description // 根据id获取商品详情
     * @Date 15:45 2022/8/1
     * @Param [goodsId]
     * @return java.lang.String
     **/
    @Override
    public GoodsVo findGoodsVOByGoodsId(Long goodsId) {
        return goodsMapper.findGoodsVOByGoodsId(goodsId);
    }
}
